<?php

namespace app\index\middleware;

use Closure;
use think\facade\Cookie;

class Login
{
    public function handle($request,Closure $closure){

        $jf_user_info = Cookie::get('jf_user_info');
        if (!$jf_user_info){
            return redirect('/index');
        }
        return $closure($request);
    }
}